//
// Created by Lenovo on 2020/10/2.
//

#include <cstdio>
#include <cstring>
#include <iostream>
#include <algorithm>
using namespace std;
#define ll long long
#define debug(x) cout<<#x<<": "<<x<<endl;
const int maxn = 2e5+10;
ll a[maxn];
ll delf[maxn];
int main()
{
    ll t;
    scanf("%lld",&t);
    int kcase = 0;
    while (t--)
    {
        int flag = 1;
        ll n;
        scanf("%lld",&n);
        for(int i = 1;i<=n;i++)
        {
            scanf("%lld",&a[i]);
            delf[i] = a[i]-a[i-1];
        }
        a[n+1] = 0;
        delf[n+1] = a[n+1]-a[n];
        for(int i = 1;i<=n+1;i++) printf("%d ",delf[i]);
        printf("\n");
        if(delf[0]<0||delf[2]<0||delf[3]<0) flag = 0;
        else
        {
            ll sum = 0;
            for(int i = 1;i<=n+1;i++)
            {
               if(delf[i]>0) sum += delf[i];
               int k = i+3;
               if(k>n+1) break;
               if(delf[k]<0)
               {
                   sum += delf[k];
                   delf[k] = 0;
               }
                if(sum<0) break;
            }
           // debug(sum);
            if(sum!=0) flag = 0;
        }
        if(flag) printf("Case #%d: Yes\n",++kcase);
        else printf("Case #%d: No\n",++kcase);
    }

}